Optimal. Leaf size=126 \[ 4 i a^3 x+\frac {4 a^3 \log (\cos (c+d x))}{d}-\frac {4 i a^3 \tan (c+d x)}{d}+\frac {2 a^3 \tan ^2(c+d x)}{d}+\frac {4 i a^3 \tan ^3(c+d x)}{3 d}-\frac {11 a^3 \tan ^4(c+d x)}{20 d}-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {3637, 3673,
3609, 3606, 3556} \begin {gather*} -\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}-\frac {11 a^3 \tan ^4(c+d x)}{20 d}+\frac {4 i a^3 \tan ^3(c+d x)}{3 d}+\frac {2 a^3 \tan ^2(c+d x)}{d}-\frac {4 i a^3 \tan (c+d x)}{d}+\frac {4 a^3 \log (\cos (c+d x))}{d}+4 i a^3 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3556
Rule 3606
Rule 3609
Rule 3637
Rule 3673
Rubi steps
\begin {align*} \int \tan ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx &=-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}+\frac {1}{5} a \int \tan ^3(c+d x) (a+i a \tan (c+d x)) (9 a+11 i a \tan (c+d x)) \, dx\\ &=-\frac {11 a^3 \tan ^4(c+d x)}{20 d}-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}+\frac {1}{5} a \int \tan ^3(c+d x) \left (20 a^2+20 i a^2 \tan (c+d x)\right ) \, dx\\ &=\frac {4 i a^3 \tan ^3(c+d x)}{3 d}-\frac {11 a^3 \tan ^4(c+d x)}{20 d}-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}+\frac {1}{5} a \int \tan ^2(c+d x) \left (-20 i a^2+20 a^2 \tan (c+d x)\right ) \, dx\\ &=\frac {2 a^3 \tan ^2(c+d x)}{d}+\frac {4 i a^3 \tan ^3(c+d x)}{3 d}-\frac {11 a^3 \tan ^4(c+d x)}{20 d}-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}+\frac {1}{5} a \int \tan (c+d x) \left (-20 a^2-20 i a^2 \tan (c+d x)\right ) \, dx\\ &=4 i a^3 x-\frac {4 i a^3 \tan (c+d x)}{d}+\frac {2 a^3 \tan ^2(c+d x)}{d}+\frac {4 i a^3 \tan ^3(c+d x)}{3 d}-\frac {11 a^3 \tan ^4(c+d x)}{20 d}-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}-\left (4 a^3\right ) \int \tan (c+d x) \, dx\\ &=4 i a^3 x+\frac {4 a^3 \log (\cos (c+d x))}{d}-\frac {4 i a^3 \tan (c+d x)}{d}+\frac {2 a^3 \tan ^2(c+d x)}{d}+\frac {4 i a^3 \tan ^3(c+d x)}{3 d}-\frac {11 a^3 \tan ^4(c+d x)}{20 d}-\frac {\tan ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(296\) vs. \(2(126)=252\).
time = 1.33, size = 296, normalized size = 2.35 \begin {gather*} \frac {a^3 \sec (c) \sec ^5(c+d x) \left (105 \cos (2 c+3 d x)+150 i d x \cos (2 c+3 d x)+105 \cos (4 c+3 d x)+150 i d x \cos (4 c+3 d x)+30 i d x \cos (4 c+5 d x)+30 i d x \cos (6 c+5 d x)+75 \cos (2 c+3 d x) \log \left (\cos ^2(c+d x)\right )+75 \cos (4 c+3 d x) \log \left (\cos ^2(c+d x)\right )+15 \cos (4 c+5 d x) \log \left (\cos ^2(c+d x)\right )+15 \cos (6 c+5 d x) \log \left (\cos ^2(c+d x)\right )+75 \cos (d x) \left (3+4 i d x+2 \log \left (\cos ^2(c+d x)\right )\right )+75 \cos (2 c+d x) \left (3+4 i d x+2 \log \left (\cos ^2(c+d x)\right )\right )-470 i \sin (d x)+360 i \sin (2 c+d x)-280 i \sin (2 c+3 d x)+135 i \sin (4 c+3 d x)-83 i \sin (4 c+5 d x)\right )}{240 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 83, normalized size = 0.66
method | result | size |
derivativedivides | \(\frac {a^{3} \left (-4 i \tan \left (d x +c \right )-\frac {i \left (\tan ^{5}\left (d x +c \right )\right )}{5}-\frac {3 \left (\tan ^{4}\left (d x +c \right )\right )}{4}+\frac {4 i \left (\tan ^{3}\left (d x +c \right )\right )}{3}+2 \left (\tan ^{2}\left (d x +c \right )\right )-2 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )+4 i \arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(83\) |
default | \(\frac {a^{3} \left (-4 i \tan \left (d x +c \right )-\frac {i \left (\tan ^{5}\left (d x +c \right )\right )}{5}-\frac {3 \left (\tan ^{4}\left (d x +c \right )\right )}{4}+\frac {4 i \left (\tan ^{3}\left (d x +c \right )\right )}{3}+2 \left (\tan ^{2}\left (d x +c \right )\right )-2 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )+4 i \arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(83\) |
risch | \(-\frac {8 i a^{3} c}{d}+\frac {2 a^{3} \left (240 \,{\mathrm e}^{8 i \left (d x +c \right )}+585 \,{\mathrm e}^{6 i \left (d x +c \right )}+695 \,{\mathrm e}^{4 i \left (d x +c \right )}+385 \,{\mathrm e}^{2 i \left (d x +c \right )}+83\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}+\frac {4 a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(99\) |
norman | \(\frac {2 a^{3} \left (\tan ^{2}\left (d x +c \right )\right )}{d}-\frac {3 a^{3} \left (\tan ^{4}\left (d x +c \right )\right )}{4 d}+4 i a^{3} x -\frac {4 i a^{3} \tan \left (d x +c \right )}{d}+\frac {4 i a^{3} \left (\tan ^{3}\left (d x +c \right )\right )}{3 d}-\frac {i a^{3} \left (\tan ^{5}\left (d x +c \right )\right )}{5 d}-\frac {2 a^{3} \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{d}\) | \(109\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.87, size = 95, normalized size = 0.75 \begin {gather*} -\frac {12 i \, a^{3} \tan \left (d x + c\right )^{5} + 45 \, a^{3} \tan \left (d x + c\right )^{4} - 80 i \, a^{3} \tan \left (d x + c\right )^{3} - 120 \, a^{3} \tan \left (d x + c\right )^{2} - 240 i \, {\left (d x + c\right )} a^{3} + 120 \, a^{3} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 240 i \, a^{3} \tan \left (d x + c\right )}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.45, size = 214, normalized size = 1.70 \begin {gather*} \frac {2 \, {\left (240 \, a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} + 585 \, a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 695 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 385 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + 83 \, a^{3} + 30 \, {\left (a^{3} e^{\left (10 i \, d x + 10 i \, c\right )} + 5 \, a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )\right )}}{15 \, {\left (d e^{\left (10 i \, d x + 10 i \, c\right )} + 5 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.37, size = 207, normalized size = 1.64 \begin {gather*} \frac {4 a^{3} \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} + \frac {480 a^{3} e^{8 i c} e^{8 i d x} + 1170 a^{3} e^{6 i c} e^{6 i d x} + 1390 a^{3} e^{4 i c} e^{4 i d x} + 770 a^{3} e^{2 i c} e^{2 i d x} + 166 a^{3}}{15 d e^{10 i c} e^{10 i d x} + 75 d e^{8 i c} e^{8 i d x} + 150 d e^{6 i c} e^{6 i d x} + 150 d e^{4 i c} e^{4 i d x} + 75 d e^{2 i c} e^{2 i d x} + 15 d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 274 vs. \(2 (112) = 224\).
time = 0.91, size = 274, normalized size = 2.17 \begin {gather*} \frac {2 \, {\left (30 \, a^{3} e^{\left (10 i \, d x + 10 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 150 \, a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 300 \, a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 300 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 150 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 240 \, a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} + 585 \, a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 695 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 385 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + 30 \, a^{3} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 83 \, a^{3}\right )}}{15 \, {\left (d e^{\left (10 i \, d x + 10 i \, c\right )} + 5 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.79, size = 87, normalized size = 0.69 \begin {gather*} -\frac {4\,a^3\,\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )+a^3\,\mathrm {tan}\left (c+d\,x\right )\,4{}\mathrm {i}-2\,a^3\,{\mathrm {tan}\left (c+d\,x\right )}^2-\frac {a^3\,{\mathrm {tan}\left (c+d\,x\right )}^3\,4{}\mathrm {i}}{3}+\frac {3\,a^3\,{\mathrm {tan}\left (c+d\,x\right )}^4}{4}+\frac {a^3\,{\mathrm {tan}\left (c+d\,x\right )}^5\,1{}\mathrm {i}}{5}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________